﻿<uc:BaseKioskControl x:Class="Kiosk.UserControls.HomeScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:csla="clr-namespace:Csla.Wpf;assembly=Csla"
    xmlns:library="clr-namespace:Kiosk.Library;assembly=Kiosk.Library"    
    xmlns:lib="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.Transition;assembly=J832.Wpf.BagOTricksLib"
    xmlns:uc="clr-namespace:Kiosk.UserControls" Height="400" Width="600">
    <uc:BaseKioskControl.Resources>
        <csla:CslaDataProvider x:Key="eventDataProvider"  x:Name="eventDataProvider" FactoryMethod="GetAllActiveEvents" DataChanged="DataProvider_DataChanged"  IsAsynchronous="True" ObjectType="{x:Type library:NotificationReadOnlyList}"  />
        <csla:CslaDataProvider x:Key="meetingDataProvider" x:Name="meetingDataProvider" FactoryMethod="GetAllActiveMeetings" DataChanged="DataProvider_DataChanged" IsAsynchronous="True" ObjectType="{x:Type library:NotificationReadOnlyList}"  />
        <csla:CslaDataProvider x:Key="deliveryDataProvider" x:Name="deliveryDataProvider" FactoryMethod="GetAllActiveDeliveries" DataChanged="DataProvider_DataChanged" IsAsynchronous="True" ObjectType="{x:Type library:NotificationReadOnlyList}"  />
    </uc:BaseKioskControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Name="colNotification" Width="1*" />
            <ColumnDefinition Name="colPresentation" Width="3*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0" Name="pnlNotifications">
            
            <uc:NotificationListPresenter x:Name="ucMeetings" Title="Meetings" MaxNumberItemsDisplayed="3"
                NotificationSelected="notification_Selected" DataContext="{StaticResource meetingDataProvider}" />
            <uc:NotificationListPresenter x:Name="ucEvents" Title="Events"  MaxNumberItemsDisplayed="2"
                NotificationSelected="notification_Selected" DataContext="{StaticResource eventDataProvider}"></uc:NotificationListPresenter>
            <uc:NotificationListPresenter x:Name="ucDelivery" Title="Deliveries" MaxNumberItemsDisplayed="4"
                NotificationSelected="notification_Selected" DataContext="{StaticResource deliveryDataProvider}"></uc:NotificationListPresenter>
        </StackPanel>

        <Border Name="brdContainer" Grid.Column="1"  >
           
                <uc:PresentationPresenter x:Name="ucPresentation" ></uc:PresentationPresenter>
        </Border>
        </Grid>
</uc:BaseKioskControl>
